package com.xyh.transaction.service;

import com.github.pagehelper.PageInfo;
import com.meilisearch.sdk.exceptions.MeilisearchException;
import com.xyh.transaction.entity.dto.goods.EditOrAddGoodsDto;
import com.xyh.transaction.entity.dto.goods.GoodsDto;
import com.xyh.transaction.entity.dto.user.ArrDto;
import com.xyh.transaction.entity.vo.GoodsConditionVo;
import com.xyh.transaction.entity.vo.GoodsDetailVo;
import com.xyh.transaction.entity.vo.GoodsVo;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface GoodsService {
    List<GoodsVo> getUrgentGoodsList();

    List<GoodsVo> getHomeGoodsList();

    GoodsDetailVo getGoodsDetail(Integer id);

    List<GoodsVo> getHotList();

    PageInfo<GoodsVo> getGoodsList(GoodsDto goodsDto);

    void deleteGoods(ArrDto arrDto) throws MeilisearchException;

    void addGoods(EditOrAddGoodsDto editOrAddGoodsDto) throws MeilisearchException;

    void editGoods(EditOrAddGoodsDto editOrAddGoodsDto) throws MeilisearchException;

    List<GoodsVo> getRelevantGoodsList(Integer limit);

    List<GoodsVo> searchGoods(String searchText);

    List<GoodsConditionVo> getConditionList();

    ResponseEntity<byte[]> exportGoodsList(GoodsDto goodsDto);

    void importGoods(MultipartFile file, Boolean isCover);

    void saveEvaluation(List<GoodsDto> goodsDtos);
}
